<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./react/react.development.js"></script>
    <script src="./react/react-dom.development.js"></script>
</head>
<body>
<div id="app"></div>
<script>

    // React对象 -> react.development.js
    // ReactDOM对象 -> react-dom.development.js

    let app = document.querySelector('#app');
    let root = ReactDOM.createRoot(app);  //root根对象，react渲染的

    //root.render('<h2>hello world</h2>');
    // React.createElement() -> 创建虚拟DOM
    let element = React.createElement('h2', {title: 'hi'}, 'hello world');
    root.render(element);

</script>
</body>
</html>